<?php
	session_start();
	function create_image()
	{
	   $md5_hash = md5(rand(0,999));
	   $security_code = substr($md5_hash, 15, 5);
	   $_SESSION["security_code1"] = $security_code;
	       $width = 55;
	       $height = 30;
	           $image = ImageCreate($width, $height);
	           
               $white = ImageColorAllocate($image, 5, 75, 0);
	           $black = ImageColorAllocate($image, 255, 185,134);
	 
     ImageFill($image, 3, 0, $black);
	 ImageString($image, 10, 10, 6, $security_code, $white);
	 
     header("Content-Type: image/jpeg");
	 
     ImageJpeg($image);
	 ImageDestroy($image);
	
    }
	create_image() ;
	exit();  
?>
